GCC_DIR = /usr/bin
CXX = $(GCC_DIR)/g++
CXX_FLAGS = -Wall -W -pedantic -ansi

parity: parity.o State.o error.o
	$(CXX) $(CXX_FLAGS) -o parity parity.o State.o error.o

parity.o: parity.cc State.h Direction.h error.h
	$(CXX) $(CXX_FLAGS) -c parity.cc

State.o: State.cc State.h error.h
	$(CXX) $(CXX_FLAGS) -c State.cc

error.o: error.cc error.h
	$(CXX) $(CXX_FLAGS) -c error.cc

clean:
	rm -f parity parity.o State.o error.o
